{{extend './_layouts/home.html'}}

{{block 'title'}}{{'多人博客 - 首页'}}{{/block}}

{{block 'body'}}
<section class="container">
  <ul class="media-list">
    {{ each index}}
      <li class="media">
        <div class="media-left">
          <a href="#">
              <img width="40" height="40" class="media-object" src="{{ $value.avatar }}" alt="...">
            </a>
        </div>
        <div class="media-body">
          <h4 class="media-heading"><a href="/topics/show?id={{ $value.id }}">{{ $value.title }}</a></h4>
          <!-- <p>sueysok 回复了问题 • 2 人关注 • 1 个回复 • 187 次浏览 • 2017-10-20 13:45</p> -->
          <p> 回复了问题 • {{ $value.evaluationNub }} 个回复 • {{ $value.browse }} 次浏览 • {{ $value.newtime | dateFormat 'yyyy-MM-dd hh:mm:ss' }}</p>
        </div>
      </li>
    {{ /each }}
  </ul>
  <nav aria-label="Page navigation">
    <ul class="pagination">
      <li>
        {{ if 1 == page.nuber }}
        <a href="javascript:;" aria-label="Previous" style="background-color: #eee;">
        {{ else }}
        <a href="/?skip={{ page.nuber - 1 }}" aria-label="Previous">
        {{ /if }}
          <span aria-hidden="true">&laquo;</span>
        </a>
      </li>
      {{ each page.Arry }}
        {{ if $value == page.nuber }}
          <li class="active"><a href="/?skip={{ $value }}">{{ $value }}</a></li>
        {{ else }}
          <li><a href="/?skip={{ $value }}">{{ $value }}</a></li>
        {{ /if }}
      {{ /each }}
      <li>
        {{ if page.Arry.length == page.nuber }}
        <a href="javascript:;" aria-label="Next" style="background-color: #eee;">
          {{ else }}
        <a href="/?skip={{ page.nuber + 1 }}" aria-label="Next">
        {{ /if }}
        <span aria-hidden="true">&raquo;</span>
      </a>
      </li>
    </ul>
  </nav>
</section>
{{/block}}
